<?php 
session_start();
include_once($_SERVER['DOCUMENT_ROOT'].'/public/func.php');
$config=include_once($_SERVER['DOCUMENT_ROOT'].'/public/config.php');
$id=$_GET['id'];
$res_p=sel($config,'article',"where id<$id limit 0,1");
// var_dump($res_p);die;
$res_n=sel($config,'article',"where id>$id limit 0,1");
$res=sel($config,'article',"where id=$id");
$res_reply=sel($config,'reply',"where aid=$id"); 
 ?>
<html>
<head>
<meta charset="utf-8">
<title>杨青个人博客网站—一个站在web前段设计之路的女技术员个人博客网站</title>
<meta name="keywords" content="个人博客,杨青个人博客,个人博客模板,杨青" />
<meta name="description" content="杨青个人博客，是一个站在web前端设计之路的女程序员个人网站，提供个人博客模板免费资源下载的个人原创网站。" />
<link href="/home/public/css/base.css" rel="stylesheet">
<link href="/home/public/css/new.css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="/public/baidubianjiqi/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/public/baidubianjiqi/ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="/public/baidubianjiqi/lang/zh-cn/zh-cn.js"></script>

</head>
<body>
<header>
  <div id="logo"><a href="/"></a></div>
  <nav class="topnav" id="topnav">
  <a href="index.html"><span>首页</span>
 <a href="/home/index.php"><span>首页</span><span class="en">Protal</span></a>
  <a href="/home/about.php"><span>关于我</span><span class="en">About</span></a>
  <a href="/home/article.php"><span>我的文章</span><span class="en">Life</span></a>
  <a href="/home/message/message.php"><span>留言版</span><span class="en">Doing</span></a>
  </nav>
  </nav>
</header>




<article class="blogs">
  <h1 class="t_nav"><span>您当前的位置：<a href="/home/index.php">首页</a>&nbsp;&gt;&nbsp;<a href="/news/s/">慢生活</a>&nbsp;&gt;&nbsp;<a href="/news/s/">日记</a></span><a href="/" class="n1">网站首页</a><a href="/" class="n2">日记</a></h1>
  <div class="index_about">
    <h2 class="c_titile"><?php echo $res[0]['title'] ?></h2>
    <p class="box_c"><span class="d_time">发布时间：<?php echo date('Y-m-d H:i:s',$res[0]['time']) ?></span><span>编辑：杨青</span><span>互动QQ群：<a href="http://wp.qq.com/wpa/qunwpa?idkey=d4d4a26952d46d564ee5bf7782743a70d5a8c405f4f9a33a60b0eec380743c64">280998807</a></span></p>
    <ul class="infos">
      <p><img src="<?php echo $res[0]['pic'] ?>" alt="分手"></p>
      <p><?php echo $res[0]['content'] ?></p>
    </ul>

 </div>
<?php 
foreach ($res_reply as $v) {
  echo '<div class="index_about">
    
    <p class="box_c"><span class="d_time">发布时间：'.date('Y-m-d H:i:s',$v['time']).'</span><span>作者：'.$v['uid'].'</span><span>互动QQ群：<a href="http://wp.qq.com/wpa/qunwpa?idkey=d4d4a26952d46d564ee5bf7782743a70d5a8c405f4f9a33a60b0eec380743c64">280998807</a></span></p>
    <ul class="infos">
      
      <p>'.$v['content'].'</p>
    </ul>

 </div>';
}

 ?>


        <div class="result-wrap">
            <div class="result-content">
                <form action="/home/addy.php" method="post" id="myform" name="myform" enctype="multipart/form-data">
                    <table class="insert-tab" width="100%">
                        <tbody>
                        <input type="hidden" name="aid" value="<?php echo $id?>">
                        <input type="hidden" name="uid" value="<?php echo isset($_SESSION['id'])?$_SESSION['id']:'' ?>">  
                            <tr>
                                <th>内容：</th>
                                <td><script id="editor" type="text/plain" style="width:700px;height:500px;" name="content"></script>
                                <script type="text/javascript">
                                 var ue = UE.getEditor('editor');
                                 </script>
                                </td>
                            </tr>
                             
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                </form>
            </div>
        </div>
   
    
    <div class="ad"> </div>
    <div class="nextinfo">
    <?php 
if (empty($res_P)) {
  echo '<p>上一篇：这是第一篇</p>
        <p>下一篇：<a href="/home/articlede.php?id='.$res_n[0]["id"].'">'.$res_n[0]["title"].'</a></p> '; 
}else{
  if (empty($res_n)) {
  echo '<p>上一篇：<a href="/home/articlede.php?id='.$res_p[0]["id"].'">'.$res_p[0]["title"].'</a></p>
<p>下一篇：这是最后一篇';
  }else{
    echo '<p>上一篇：<a href="/home/articlede.php?id='.$res_p[0]["id"].'">'.$res_p[0]["title"].'</a></p>
          <p>下一篇：<a href="/home/articlede.php?id='.$res_n[0]["id"].'">'.$res_n[0]["title"].'</a></p>';
  }
  
}

     ?>
      
    </div>
    <div class="otherlink">
      <h2>相关文章</h2>
      <ul>
        <li><a href="/news/s/2013-07-25/524.html" title="现在，我相信爱情！">现在，我相信爱情！</a></li>
        <li><a href="/newstalk/mood/2013-07-24/518.html" title="我希望我的爱情是这样的">我希望我的爱情是这样的</a></li>
        <li><a href="/newstalk/mood/2013-07-02/335.html" title="有种情谊，不是爱情，也算不得友情">有种情谊，不是爱情，也算不得友情</a></li>
        <li><a href="/newstalk/mood/2013-07-01/329.html" title="世上最美好的爱情">世上最美好的爱情</a></li>
        <li><a href="/news/read/2013-06-11/213.html" title="爱情没有永远，地老天荒也走不完">爱情没有永远，地老天荒也走不完</a></li>
        <li><a href="/news/s/2013-06-06/24.html" title="爱情的背叛者">爱情的背叛者</a></li>
      </ul>
    </div>
  </div>
  <aside class="right">
    <!-- Baidu Button BEGIN -->
    <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare"><a class="bds_tsina"></a><a class="bds_qzone"></a><a class="bds_tqq"></a><a class="bds_renren"></a><span class="bds_more"></span><a class="shareCount"></a></div>
    <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=6574585" ></script> 
    <script type="text/javascript" id="bdshell_js"></script> 
    <script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script> 
    <!-- Baidu Button END -->
    <div class="blank"></div>
    <div class="news">
      <h3>
        <p>随机<span>文章</span></p>
      </h3>
      <ul class="rank">
      <?php 
      $res_rand=sel($config,'article',"order by rand() limit 5");
       foreach ($res_rand as $v) {
        echo '<li><a href="/home/articlede.php?id='.$v['id'].'" title="'.$v['title'].'" target="_blank">'.$v['title'].'</a></li>';
       }

       ?>
        
        
      </ul>
      <h3 class="ph">
        <p>文章<span>分类</span></p>
      </h3>
       <ul class="paih">
     <?php 
      $res_cate=sel($config,'category');
      foreach ($res_cate as $v) {
      echo '<li><a href="/" title="'.$v['name'].'" target="_blank">'.$v['name'].'</a></li>';
      }
      ?>
    </ul>
    
         
      


    </div>
    <div class="visitors">
      <h3>
        <p>最近访客</p>
      </h3>
      <ul>
      </ul>
    </div>
  </aside>
</article>
<footer>
  <p>Design by DanceSmile <a href="http://www.miitbeian.gov.cn/" target="_blank">蜀ICP备11002373号-1</a> <a href="/">网站统计</a></p>
</footer>
<script src="/home/public/js/silder.js"></script>
</body>
</html>

